import java.util.ArrayList;
import java.util.List;
import java.util.LinkedList;
import java.util.HashMap;
import java.util.TreeMap;


class ListNode {
    int val;  // 私有属性
    int ch;
    ListNode next;  // 私有属性
    ListNode() {}  // 构造函数
    ListNode(int val) { this.val = val; }  // 构造函数
    ListNode(char ch) { this.ch = ch; }
    ListNode(int val, ListNode next) { this.val = val; this.next = next; } // 构造函数
}

class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
    TreeNode() {}
    TreeNode(int val) {
        this.val = val;
        this.left = null;
        this.right = null;
    }
}

public class SomeTest {
    public static ListNode reverseList(ListNode head) {
        ListNode res = null;
        ListNode p = head;
        while (p != null) {
            ListNode q = p;
            q.next = res;
            res = q;
            p = p.next;
        }
        return res;
    }

    public static void main(String[] args){
        ListNode a = new ListNode(0);
        ListNode b = new ListNode(1);
        ListNode c = new ListNode(2);
        ListNode d = new ListNode(3);
        ListNode e = new ListNode(4);
        a.next = b;
        b.next = c;
        c.next = d;
        d.next = e;

        ListNode a_copy = a.next;
        ListNode a_copy_copy = a.next;
        b.next = new ListNode(-1);
        System.out.println("hello!");

        for (int i=0; i<10; ++i){
            System.out.println(i);
        }
    }
}
